#pragma once

#include <stdint.h>
#include <string>

class SprotoMessage
{
public:
	virtual ~SprotoMessage() {}

	virtual std::string GetMessageName() = 0;
	virtual int GetIntegerField(int tagIndex, int index, int64_t &value);
	virtual bool SetIntegerField(int tagIndex, int index, int64_t value);
	virtual int GetBooleanField(int tagIndex, int index, bool &value);
	virtual bool SetBooleanField(int tagIndex, int index, bool value);
	virtual const char *GetStringField(int tagIndex, int index, int &len);
	virtual bool SetStringField(int tagIndex, int index, const char *value,
								int len);
	virtual SprotoMessage *GetStructField(int tagIndex, int index);
	virtual SprotoMessage *SetStructField(int tagIndex, int index);
};

